/*************************************************************************
	> File Name: test.1.c
	> Author: WangYiFei
	> Mail: 824537320@qq.com
	> Created Time: Sat 09 Jan 2021 11:47:09 AM CST
 ************************************************************************/

#include "head.h"

int main() {
    struct winsize sz;
    if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &sz) < 0) {
        perror("ioctl");
        exit(1);
    }
    printf("size.x = %d, size.y = %d\n", sz.ws_col, sz.ws_row);
    for (int i = 0; i < sz.ws_col; i++) {
        // printf("%d", i);
        printf("1");
    }
    printf("2");
    printf("\n");

    return 0;
}
